# coding=utf-8
import os

from tools.config import Config


class BaseSV:
    def __init__(self):
        cfg = Config()
        self.host = cfg.read("sys", "host")
        self.login_url = self.host + "/login/login.shtml?account={account}&password={password}"
        self.alert_scan_qrcode_url = self.host + "/payment/qrcode/alert.shtml"
        self.bill_url = self.host + "/payment/bill.shtml"
        self.authorization = "authorization"
        self.alipay_login_url = "https://authzui.alipay.com/login/index.htm"
        self.alipay_bill_url = "https://consumeprod.alipay.com/record/standard.htm"
        self.chromedriver_path = os.path.abspath(os.path.dirname(__file__)) + "/chromedriver"
        # self.chromedriver_path = "C:/Program Files (x86)/Google/Chrome/Application/chromedriver"

        self.safe_page_title = '安全校验 - 支付宝'
        self.safe_check_failed_page_title = '安全校验失败 - 支付宝'
        self.bill_page_title = '我的账单 - 支付宝'
        self.login_page_title = '登录 - 支付宝'
        self.my_alipay_page_title = '我的支付宝 － 支付宝'
